package com.cms.material.activity

import androidx.core.content.ContextCompat
import com.alibaba.android.arouter.facade.annotation.Route
import com.android.baselibrary.arouter.ArouterContains
import com.android.baselibrary.base.BaseActivity
import com.cms.material.NbdStickItemDivider
import com.cms.material.R
import com.cms.material.adapter.MaterialMainAdapter
import com.cms.material.bean.MaterialBean
import com.cms.material.databinding.ActivityMaterialMainBinding

@Route(path =ArouterContains.MATERILA)
class MaterialMainActivity : BaseActivity<ActivityMaterialMainBinding>() {


    override fun getLayoutId(): Int {
        return R.layout.activity_material_main
    }

    override fun initView() {
        mBinding.rvMaterial.addItemDecoration(NbdStickItemDivider(
            context = this,
            height = 36f,
            bgColor = ContextCompat.getColor(this, com.android.baselibrary.R.color.white),
            textColor = ContextCompat.getColor(this, com.android.baselibrary.R.color.color_N5),
            textSize = 13f,
            textPaddingLeft = 0f,
            isTextCenter = false,
            lineColor = ContextCompat.getColor(this, com.android.baselibrary.R.color.color_N3))
        )
        val adapter = MaterialMainAdapter()
        mBinding.rvMaterial.adapter = adapter
        adapter.setData(list)

    }

    override fun initListener() {

    }


    private val list by  lazy {
        listOf<MaterialBean>(
            MaterialBean("Material Design", "https://material.io/design"),
            MaterialBean("Material ", "Bttps://material.io/design"),
            MaterialBean("Baterial Design", "cttps://material.io/design"),
            MaterialBean("Material Design", "dttps://material.io/design"),
            MaterialBean("Material ", "https://material.io/design"),
            MaterialBean("Baterial Design", "https://material.io/design"),
            MaterialBean("Material Design", "https://material.io/design"),
            MaterialBean("Material ", "https://material.io/design"),
            MaterialBean("Baterial Design", "attps://material.io/design"),
            MaterialBean("Material Design", "https://material.io/design"),
            MaterialBean("Material ", "https://material.io/design"),
            MaterialBean("Baterial Design", "https://material.io/design"),
            MaterialBean("Material Design", "https://material.io/design"),
            MaterialBean("Material ", "https://material.io/design"),
            MaterialBean("Baterial Design", "https://material.io/design"),
        )
    }
}